package com.info.protocol.netty.core;


import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.experimental.Accessors;

@Getter
@Setter
@Accessors(chain = true)
@AllArgsConstructor
@NoArgsConstructor
public class Header {

    /*
        +---------------------------------------------------------------------------------------------+
        |魔数 16bit|协议版本 8bit|序列化方式 8bit| 消息长度 32bit |消息类型（请求还是响应）2bit|messageId 64bit |
        +---------------------------------------------------------------------------------------------+
     */

    private short magic;

    private byte protocolVersion;

    private byte serializeType;

    private int messageLength;

    private byte messageType;

    private long messageId;
}
